// 构造函数使用泛型
{
  interface UserInterface {
    name: string,
    age: number
  }

  class User<T> {
    public constructor(private _user: T) { }
    public get(): T {
      return this._user
    }
  }
  const obj = new User<UserInterface>({ name: 'zrf', age: 23 })

  console.log(obj.get().name);

}